import request from '@/utils/request'

// 获取列表数据
export function getdataList(query) {
  return request({
    url: 'archive/personal/library/list',
    method: 'get',
    params: query
  })
}

// 获取专题库列表
export function getSpecialList(data) {
  return request({
    url: 'archive/personal/library/subject/list?pageNum='+ data.pageNum + '&pageSize=' + data.pageSize + '&typeState=' + data.typeState + '&zhuanTiID=' +data.zhuanTiID,
    method: 'post',
    data: data
  })
}

// 退回到个人库
export function returnPerson(id) {
  return request({
    url: 'archive/personal/library/subject/' + id,
    method: 'put'
  })
}

// 新增资料
export function addPersonal(data) {
  return request({
    url: 'archive/personal/library',
    method: 'post',
    data: data
  })
}

// 删除资料
export function deleteInfomation(id) {
  return request({
    url: 'archive/personal/library/'+ id,
    method: 'delete'
  })
}

// 提升到公共库
export function updatePublic(data) {
  return request({
    url: 'archive/personal/library/communal/update?IDs='+ data.IDs + '&typeState=' + data.typeState,
    method: 'post',
    data: data
  })
}

// 添加至专题库
export function updateSpecial(data) {
  return request({
    url: 'archive/personal/library/subject/add',
    method: 'post',
    data: data
  })
}


